package com.tenement.mybatis.entity;

import java.io.Serializable;

/**
 * 用户收藏实体类
 * 
 * @author wk
 *
 */
public class Collect implements Serializable {

	private Integer cId;

	private Integer hId;

	private Integer uId;

	private String cCollectdate;

	private House house;

	private static final long serialVersionUID = 1L;

	public Collect(Integer cId) {
		super();
		this.cId = cId;
	}

	public Collect(Integer hId, Integer uId, String cCollectdate) {
		super();
		this.hId = hId;
		this.uId = uId;
		this.cCollectdate = cCollectdate;
	}

	public Collect() {
		super();
	}

	public Integer getcId() {
		return cId;
	}

	public void setcId(Integer cId) {
		this.cId = cId;
	}

	public Integer gethId() {
		return hId;
	}

	public void sethId(Integer hId) {
		this.hId = hId;
	}

	public Integer getuId() {
		return uId;
	}

	public void setuId(Integer uId) {
		this.uId = uId;
	}

	public String getcCollectdate() {
		return cCollectdate;
	}

	public void setcCollectdate(String cCollectdate) {
		this.cCollectdate = cCollectdate == null ? null : cCollectdate.trim();
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		Collect other = (Collect) that;
		return (this.getcId() == null ? other.getcId() == null : this.getcId().equals(other.getcId()))
				&& (this.gethId() == null ? other.gethId() == null : this.gethId().equals(other.gethId()))
				&& (this.getuId() == null ? other.getuId() == null : this.getuId().equals(other.getuId()))
				&& (this.getcCollectdate() == null ? other.getcCollectdate() == null
						: this.getcCollectdate().equals(other.getcCollectdate()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getcId() == null) ? 0 : getcId().hashCode());
		result = prime * result + ((gethId() == null) ? 0 : gethId().hashCode());
		result = prime * result + ((getuId() == null) ? 0 : getuId().hashCode());
		result = prime * result + ((getcCollectdate() == null) ? 0 : getcCollectdate().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", cId=").append(cId);
		sb.append(", hId=").append(hId);
		sb.append(", uId=").append(uId);
		sb.append(", cCollectdate=").append(cCollectdate);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}

	public House getHouse() {
		return house;
	}

	public void setHouse(House house) {
		this.house = house;
	}
}